package com.bingqing.wiremock;

import org.junit.jupiter.api.Test;

import static io.restassured.RestAssured.given;

public class Demo_02_Test_RequestMatching {
    @Test
    void testRequestMatching() {
        given().log().all()
                .auth().preemptive().basic("jeff@example.com", "jeffteenjefftyjeff")
                .header("Accept", "xml")
                .cookie("session", "123456")
                .body("{\"a\":1,\"b\":2}")
                .queryParam("search_term", "WireMock")
                .when()
                .post("http://localhost:8090/everything").
                then().log().all()
                .extract();
    }
}

